import { useMenuStore } from "@/stores/menuStore"
import { Menu } from "@element-plus/icons"
import router from "@/router";

const menuStore = useMenuStore()

const MenuBread = () => {
  return !menuStore.route.matched.slice(-1)[0].meta.breadhidden && <div class="bread">
    <el-breadcrumb separator="/">
      <el-breadcrumb-item  onClick={()=>{
	      router.push('/system')
      }}>
        <el-icon >
          <Menu />
        </el-icon>
      </el-breadcrumb-item>
      {
        menuStore.route.matched.slice(1).map((routeItem) => {
          return <el-breadcrumb-item>
            <span>{routeItem.name}</span>
          </el-breadcrumb-item>
        })
      }
    </el-breadcrumb>
  </div>
}




export default MenuBread